Disco Diffusion
Contents
Disco Diffusion#
This is an simple way of creating compelling Disco Diffusion artworks for generative artists.
Prepare Environment#
%config InlineBackend.figure_format='retina'
%load_ext autotime
from ekorpkit import eKonf
eKonf.setLogger("INFO")
eKonf.set_cuda(device=0)
print("version:", eKonf.__version__)
is_colab = eKonf.is_colab()
print("is colab?", is_colab)
if is_colab:
eKonf.mount_google_drive()
project_dir = eKonf.set_workspace(workspace="/content/drive/MyDrive/workspace/", project="ekorpkit-book")
print("project_dir:", project_dir)
INFO:ekorpkit.base:Setting cuda device to ['A100-SXM4-40GB (id:0)']
INFO:ekorpkit.utils.notebook:Google Colab not detected.
INFO:ekorpkit.base:Setting EKORPKIT_WORKSPACE_ROOT to /content/drive/MyDrive/workspace/
INFO:ekorpkit.base:Setting EKORPKIT_PROJECT to ekorpkit-book
INFO:ekorpkit.base:Loaded .env from /workspace/projects/ekorpkit-book/config/.env
version: 0.1.40.post0.dev7
is colab? False
project_dir: /content/drive/MyDrive/workspace/projects/ekorpkit-book
time: 2 s (started: 2022-11-06 11:27:25 +00:00)
Create a disco instance#
cfg = eKonf.compose("model/disco")
disco = eKonf.instantiate(cfg)
print(f"Version: {disco.version}")
time: 222 µs (started: 2022-11-07 11:36:22 +00:00)
Image only mode#
disco.config.models.openclip_models.RN101_quickgelu_yfcc15m = True
disco.config.models.diffusion_model = "watercolordiffusion"
eKonf.print(disco.config.models)
# If you change model configs, you have to reload models
disco.load_models()
{'clip_models': {'RN101': False,
'RN50': False,
'RN50x16': False,
'RN50x4': False,
'RN50x64': False,
'ViTB16': True,
'ViTB32': True,
'ViTL14': False,
'ViTL14_336px': False},
'custom_model': 'ema_0.9999_058000.pt',
'diffusion_model': 'watercolordiffusion',
'openclip_models': {'RN101_quickgelu_yfcc15m': True,
'RN101_yfcc15m': False,
'RN50_cc12m': True,
'RN50_quickgelu_cc12m': False,
'RN50_quickgelu_yfcc15m': False,
'RN50_yffcc15m': False,
'ViTB16_laion400m_e31': False,
'ViTB16_laion400m_e32': False,
'ViTB32_laion2b_e16': False,
'ViTB32_laion400m_e31': False,
'ViTB32_laion400m_e32': True,
'ViTB32quickgelu_laion400m_e31': False,
'ViTB32quickgelu_laion400m_e32': False}}
Setting up [LPIPS] perceptual loss: trunk [vgg], v[0.1], spatial [off]
Loading model from: /opt/conda/lib/python3.8/site-packages/lpips/weights/v0.1/vgg.pth
text_prompts = "A beautiful water painting of Jeju Island."
batch_name = "jeju"
results = disco.imagine(
text_prompts,
batch_name=batch_name,
n_samples=2,
steps=200,
show_collage=True,
diffusion_sampling_mode='ddim',
clip_guidance_scale=7500,
use_secondary_model=False,
)
results
{'image_filepaths': ['/workspace/projects/ekorpkit-book/disco-imagen/outputs/disco-diffusion/jeju/jeju(7)_0000.png',
'/workspace/projects/ekorpkit-book/disco-imagen/outputs/disco-diffusion/jeju/jeju(7)_0001.png'],
'config_file': 'jeju(7)_settings.yaml',
'config': {'animation_mode': 'None',
'batch_name': 'jeju',
'display_rate': 20,
'n_samples': 2,
'batch_size': 1,
'resume_run': False,
'run_to_resume': 'latest',
'resume_from_frame': 'latest',
'retain_overwritten_frames': True,
'diffusion_sampling_mode': 'ddim',
'use_secondary_model': False,
'steps': 200,
'width_height': [512, 448],
'width_height_for_512x512_models': [1280, 768],
'width_height_for_256x256_models': [512, 448],
'clip_guidance_scale': 7500,
'tv_scale': 0,
'range_scale': 150,
'sat_scale': 0,
'cutn_batches': 4,
'skip_augs': False,
'init_image': 'None',
'init_scale': 1000,
'skip_steps': 10,
'frames_scale': 1500,
'frames_skip_steps': '60%',
'video_init_steps': 100,
'video_init_clip_guidance_scale': 1000,
'video_init_tv_scale': 0.1,
'video_init_range_scale': 150,
'video_init_sat_scale': 300,
'video_init_cutn_batches': 4,
'video_init_skip_steps': 50,
'video_init_file': 'init.mp4',
'video_init_path': '/workspace/projects/ekorpkit-book/disco-imagen/init_images/init.mp4',
'extract_nth_frame': 2,
'persistent_frame_output_in_batch_folder': True,
'video_init_seed_continuity': False,
'video_init_flow_warp': True,
'video_init_flow_blend': 0.999,
'video_init_check_consistency': False,
'video_init_blend_mode': 'optical flow',
'video_init_frames_scale': 15000,
'video_init_frames_skip_steps': '70%',
'force_flow_generation': False,
'key_frames': True,
'max_frames': 1,
'interp_spline': 'Linear',
'angle': '0:(0)',
'zoom': '0: (1), 10: (1.05)',
'translation_x': '0: (0)',
'translation_y': '0: (0)',
'translation_z': '0: (10.0)',
'rotation_3d_x': '0: (0)',
'rotation_3d_y': '0: (0)',
'rotation_3d_z': '0: (0)',
'midas_depth_model': 'dpt_large',
'midas_weight': 0.3,
'near_plane': 200,
'far_plane': 10000,
'fov': 40,
'padding_mode': 'border',
'sampling_mode': 'bicubic',
'turbo_mode': False,
'turbo_steps': '3',
'turbo_preroll': 10,
'vr_mode': False,
'vr_eye_angle': 0.5,
'vr_ipd': 5.0,
'intermediate_saves': [],
'steps_per_checkpoint': None,
'intermediates_in_subfolder': True,
'perlin_init': False,
'perlin_mode': 'mixed',
'set_seed': 'random_seed',
'eta': 0.8,
'clamp_grad': True,
'clamp_max': 0.05,
'randomize_class': True,
'clip_denoised': False,
'fuzzy_prompt': False,
'rand_mag': 0.05,
'cut_overview': '[14]*200+[12]*200+[4]*400+[0]*200',
'cut_innercut': '[2]*200+[4]*200+[12]*400+[12]*200',
'cut_ic_pow': '[12]*300+[12]*100+[12]*50+[12]*50+[10]*100+[10]*100+[10]*300',
'cut_icgray_p': '[0.7]*100+[0.6]*100+[0.45]*100+[0.3]*100+[0]*600',
'pad_or_pulp_cut_overview': '[15]*100+[15]*100+[12]*100+[12]*100+[6]*100+[4]*100+[2]*200+[0]*200',
'pad_or_pulp_cut_innercut': '[1]*100+[1]*100+[4]*100+[4]*100+[8]*100+[8]*100+[10]*200+[10]*200',
'pad_or_pulp_cut_ic_pow': '[12]*300+[12]*100+[12]*50+[12]*50+[10]*100+[10]*100+[10]*300',
'pad_or_pulp_cut_icgray_p': '[0.87]*100+[0.78]*50+[0.73]*50+[0.64]*60+[0.56]*40+[0.50]*50+[0.33]*100+[0.19]*150+[0]*400',
'watercolor_cut_overview': '[14]*200+[12]*200+[4]*400+[0]*200',
'watercolor_cut_innercut': '[2]*200+[4]*200+[12]*400+[12]*200',
'watercolor_cut_ic_pow': '[12]*300+[12]*100+[12]*50+[12]*50+[10]*100+[10]*100+[10]*300',
'watercolor_cut_icgray_p': '[0.7]*100+[0.6]*100+[0.45]*100+[0.3]*100+[0]*600',
'use_vertical_symmetry': False,
'use_horizontal_symmetry': False,
'transformation_percent': [0.09],
'video_output': {'skip_video_for_run_all': False,
'blend': 0.5,
'video_init_check_consistency': False,
'init_frame': 1,
'last_frame': 'final_frame',
'fps': 12,
'view_video_in_cell': False},
'models': {'diffusion_model': 'watercolordiffusion',
'clip_models': {'ViTB32': True,
'ViTB16': True,
'ViTL14': False,
'ViTL14_336px': False,
'RN50x4': False,
'RN50x16': False,
'RN50x64': False,
'RN50': False,
'RN101': False},
'openclip_models': {'ViTB32_laion2b_e16': False,
'ViTB32_laion400m_e31': False,
'ViTB32_laion400m_e32': True,
'ViTB32quickgelu_laion400m_e31': False,
'ViTB32quickgelu_laion400m_e32': False,
'ViTB16_laion400m_e31': False,
'ViTB16_laion400m_e32': False,
'RN50_yffcc15m': False,
'RN50_cc12m': True,
'RN50_quickgelu_yfcc15m': False,
'RN50_quickgelu_cc12m': False,
'RN101_yfcc15m': False,
'RN101_quickgelu_yfcc15m': True},
'custom_model': 'ema_0.9999_058000.pt'},
'text_prompts': {0: ['A beautiful water painting of Jeju Island.']},
'image_prompts': None,
'batch_num': 7,
'stop_on_next_loop': False,
'side_x': 512,
'side_y': 448,
'calc_frames_skip_steps': 120,
'start_frame': 0,
'start_sample': 0,
'seed': 2792322357,
'show_collage': True,
'show_losses': False},
'loss_values': [0.9827322363853455,
1.0207610130310059,
0.9726511240005493,
0.9845083951950073,
0.9571743011474609,
0.9464013576507568,
0.9365628957748413,
0.9504144191741943,
1.0121345520019531,
1.056891918182373,
1.0164375305175781,
1.0736870765686035,
0.94095778465271,
0.9342563152313232,
0.9306267499923706,
0.8837723135948181,
1.1263000965118408,
1.1132621765136719,
1.100480556488037,
1.1116125583648682,
0.9553558230400085,
0.9669793844223022,
0.9714478254318237,
0.9475871920585632,
0.9333595037460327,
0.9397464990615845,
0.9507750272750854,
0.9677215218544006,
1.0266427993774414,
1.0350803136825562,
1.039675235748291,
1.1452014446258545,
0.9188938140869141,
0.9194447994232178,
0.8857557773590088,
0.9667831063270569,
1.0924996137619019,
1.1024001836776733,
1.115799903869629,
1.0848941802978516,
0.9424614906311035,
0.9387176036834717,
0.9385421872138977,
0.944909930229187,
0.9122073650360107,
0.90395587682724,
0.9353196024894714,
0.8939036726951599,
1.0824335813522339,
1.0160869359970093,
1.1367100477218628,
1.0071229934692383,
0.9169861674308777,
0.8114714622497559,
0.8880318999290466,
0.8688887357711792,
1.089881420135498,
1.0386289358139038,
1.0868444442749023,
1.0847043991088867,
0.9391887187957764,
0.9472916722297668,
0.9249216318130493,
0.9297691583633423,
0.8940243721008301,
0.8994162678718567,
0.9019750952720642,
0.9099289178848267,
0.9851951599121094,
0.9953045845031738,
0.9934515953063965,
1.0068342685699463,
0.8713241815567017,
0.8387532234191895,
0.824991762638092,
0.8680294752120972,
1.1007754802703857,
1.086737871170044,
1.0266125202178955,
1.077231764793396,
0.921322226524353,
0.8902643918991089,
0.9132452011108398,
0.9217684864997864,
0.8805115818977356,
0.8722139596939087,
0.8932785987854004,
0.8973914384841919,
0.9803560376167297,
0.9798837304115295,
0.9495704174041748,
0.994461178779602,
0.8556470274925232,
0.8459622859954834,
0.8388727903366089,
0.8904471397399902,
1.1749987602233887,
0.9714462757110596,
1.055442214012146,
1.0223733186721802,
0.8998950123786926,
0.886630654335022,
0.8772205114364624,
0.8930047750473022,
0.870610773563385,
0.8792482614517212,
0.858738899230957,
0.8550927639007568,
0.9502637386322021,
0.9454277157783508,
0.9616450071334839,
0.9435676336288452,
0.8683270215988159,
0.8638681173324585,
0.8471934199333191,
0.8548758625984192,
1.0333852767944336,
1.0220513343811035,
1.088257074356079,
1.0404953956604004,
0.9622908234596252,
0.8628910779953003,
0.8950788974761963,
0.8869510889053345,
0.8588544130325317,
0.8551809787750244,
0.8586629629135132,
0.8543298244476318,
0.9311529994010925,
0.9548375010490417,
0.9506680965423584,
0.9364902973175049,
0.8376951217651367,
0.822567343711853,
0.8313899040222168,
0.7996864318847656,
1.0111238956451416,
1.0709810256958008,
0.9495271444320679,
0.9580296277999878,
0.9650225043296814,
0.8730571269989014,
0.8703732490539551,
0.8847141861915588,
0.8675491809844971,
0.8863281607627869,
0.8537242412567139,
0.8717312812805176,
1.0202717781066895,
0.913547158241272,
0.9056144952774048,
1.0000561475753784,
0.7991199493408203,
0.8136346340179443,
0.8313694000244141,
0.8083840608596802,
1.0344502925872803,
0.9952120184898376,
1.01422917842865,
1.1326237916946411,
0.8797408938407898,
0.8718618154525757,
0.89310622215271,
0.8960274457931519,
0.8483909368515015,
0.8667518496513367,
0.8653823137283325,
0.8801828026771545,
0.935133695602417,
1.0020763874053955,
0.9381875991821289,
0.9265393018722534,
0.7865350246429443,
0.7921040654182434,
0.800493597984314,
0.8121057748794556,
1.0183452367782593,
1.018704891204834,
1.022780418395996,
0.9996820688247681,
0.8738977313041687,
0.886527419090271,
0.865525484085083,
0.8708062767982483,
0.8404786586761475,
0.8399076461791992,
0.8434596061706543,
0.842109739780426,
0.9547697901725769,
0.8962676525115967,
0.8888171911239624,
0.9615027904510498,
0.8290878534317017,
0.8068804740905762,
0.8213804960250854,
0.8198028802871704,
0.9771796464920044,
0.9152783155441284,
0.9797610640525818,
1.0119051933288574,
0.8535651564598083,
0.8688198328018188,
0.9107980728149414,
0.8597493171691895,
0.8540656566619873,
0.8833164572715759,
0.8327288627624512,
0.8467395305633545,
0.9009947776794434,
0.8633336424827576,
0.8994631767272949,
0.8980646729469299,
0.7749841213226318,
0.6995967030525208,
0.7979331016540527,
0.7542138695716858,
0.905085563659668,
0.9572657942771912,
0.9964628219604492,
0.9676119089126587,
0.846747875213623,
0.845678448677063,
0.843132495880127,
0.8432213068008423,
0.8397091627120972,
0.8388276100158691,
0.8321294784545898,
0.8198383450508118,
0.8755943179130554,
0.9074465036392212,
0.8951858282089233,
0.9167764186859131,
0.735996663570404,
0.7418532371520996,
0.7479822635650635,
0.7639505863189697,
1.0416709184646606,
0.9508290886878967,
0.9678704142570496,
0.9359472990036011,
0.8539332151412964,
0.8446547985076904,
0.8505330681800842,
0.8691167831420898,
0.8154479265213013,
0.8288334012031555,
0.8179515600204468,
0.8181636929512024,
0.8439780473709106,
0.8518604040145874,
0.8488785624504089,
0.8572914600372314,
0.7425516843795776,
0.7000619769096375,
0.755760669708252,
0.759630560874939,
0.9162302017211914,
0.9302963018417358,
0.9390166997909546,
0.9607458710670471,
0.845224916934967,
0.8264985680580139,
0.8259406089782715,
0.8368414044380188,
0.8516509532928467,
0.8124760389328003,
0.8005140423774719,
0.7980514764785767,
0.8241807222366333,
0.8213726282119751,
0.8286166191101074,
0.8410165905952454,
0.7234625816345215,
0.7107269167900085,
0.763590395450592,
0.7239291667938232,
0.9051003456115723,
0.926525354385376,
0.8622959852218628,
0.9239968657493591,
0.8559913635253906,
0.8383865356445312,
0.8449413776397705,
0.8320552706718445,
0.8248643279075623,
0.8208280205726624,
0.813643217086792,
0.8405638933181763,
0.8673208355903625,
0.9258123636245728,
0.8778015971183777,
0.8554729223251343,
0.7791957855224609,
0.7294086217880249,
0.7808080911636353,
0.7503871917724609,
0.8991053104400635,
0.8539096117019653,
0.9096306562423706,
0.9059652090072632,
0.848691463470459,
0.8467477560043335,
0.8427991271018982,
0.8287143111228943,
0.8094432950019836,
0.8644529581069946,
0.8161749839782715,
0.808513343334198,
0.8429358601570129,
0.8524001836776733,
0.8525304198265076,
0.8549678921699524,
0.7493702173233032,
0.6964895725250244,
0.814603865146637,
0.6875817179679871,
0.8883099555969238,
0.8733508586883545,
0.8167161345481873,
0.9398459196090698,
0.8452550172805786,
0.8258851170539856,
0.92242830991745,
0.8091897964477539,
0.7889069318771362,
0.7844134569168091,
0.8209901452064514,
0.8203872442245483,
0.8263399600982666,
0.8569749593734741,
0.8566648960113525,
0.8564974069595337,
0.7338839769363403,
0.7295829057693481,
0.7155094146728516,
0.6921442747116089,
0.873969554901123,
0.9139268398284912,
0.8434462547302246,
0.9019745588302612,
0.8210206031799316,
0.8466984629631042,
0.8365333080291748,
0.847707986831665,
0.8585771322250366,
0.8037614822387695,
0.8046706914901733,
0.8243529796600342,
0.9397062063217163,
0.9567368030548096,
0.8492500185966492,
0.8645656108856201,
0.8236597776412964,
0.744755744934082,
0.7299478054046631,
0.7315499782562256,
0.901503324508667,
0.903364896774292,
0.8994942307472229,
0.9130053520202637,
0.8819432258605957,
0.846793532371521,
0.8406221866607666,
0.8335338830947876,
0.8034208416938782,
0.8183239698410034,
0.8007612228393555,
0.8708746433258057,
0.9323010444641113,
0.8556227684020996,
0.8230463862419128,
0.8460670709609985,
0.7174025774002075,
0.735221266746521,
0.6989532113075256,
0.7007577419281006,
0.9479578733444214,
0.9149752855300903,
0.9737905263900757,
0.9782215356826782,
0.8333038091659546,
0.8445382118225098,
0.8266513347625732,
0.843665599822998,
0.8111889362335205,
0.790043830871582,
0.849794864654541,
0.8046959638595581,
0.8914825320243835,
0.8372377157211304,
0.8350101113319397,
0.8400932550430298,
0.7542001008987427,
0.7061359882354736,
0.7257559299468994,
0.7094247341156006,
0.8885278701782227,
0.8689495325088501,
0.8107239007949829,
0.8838662505149841,
0.8060474991798401,
0.8394780158996582,
0.8256767392158508,
0.8423890471458435,
0.7966393232345581,
0.7978224158287048,
0.8080952167510986,
0.791334331035614,
0.8545413017272949,
0.844363808631897,
0.8501539826393127,
0.8441089391708374,
0.7722810506820679,
0.6964728832244873,
0.7172619104385376,
0.7130884528160095,
0.8982236385345459,
0.9008489847183228,
0.9060508012771606,
0.9034218192100525,
0.8184079527854919,
0.796438455581665,
0.8222746849060059,
0.8072277307510376,
0.8053485751152039,
0.7865924835205078,
0.7947754859924316,
0.7970926761627197,
0.811789870262146,
0.8366840481758118,
0.852696418762207,
0.8590471744537354,
0.6504411697387695,
0.6648925542831421,
0.717526376247406,
0.696764349937439,
0.817557692527771,
0.8437342643737793,
0.9490973949432373,
0.8414932489395142,
0.8220394849777222,
0.8790105581283569,
0.8160448670387268,
0.8922746181488037,
0.8054219484329224,
0.7900932431221008,
0.7830412983894348,
0.852793276309967,
0.9366110563278198,
0.8475214838981628,
0.8227020502090454,
0.8324466943740845,
0.7284876704216003,
0.6878942251205444,
0.6815463304519653,
0.7197492718696594,
0.8953084945678711,
0.8523797392845154,
0.9259717464447021,
0.8638314008712769,
0.8334840536117554,
0.833330512046814,
0.8174842596054077,
0.831680953502655,
0.7792209982872009,
0.7953912019729614,
0.8443822860717773,
0.7808381915092468,
0.8368418216705322,
0.8407737016677856,
0.8338276147842407,
0.8353214263916016,
0.7180619239807129,
0.7356435656547546,
0.711794376373291,
0.7147691249847412,
0.8327959775924683,
0.850701093673706,
0.8992452025413513,
0.8553953170776367,
0.813060998916626,
0.8515962362289429,
0.833747386932373,
0.8098023533821106,
0.7720355987548828,
0.8608852028846741,
0.8003193140029907,
0.7845063209533691,
0.8424868583679199,
0.840761661529541,
0.8351617455482483,
0.8314927816390991,
0.6921820640563965,
0.6902604103088379,
0.7257668972015381,
0.7001607418060303,
0.9025324583053589,
0.8412585258483887,
0.9308522939682007,
0.8733105659484863,
0.8199790716171265,
0.8078361749649048,
0.82878178358078,
0.8098337650299072,
0.8002151846885681,
0.7751457095146179,
0.807516872882843,
0.7922816276550293,
0.9535956382751465,
0.8347111940383911,
0.8116804361343384,
0.8299827575683594,
0.7320687174797058,
0.7138159871101379,
0.7016777992248535,
0.6615856885910034,
0.8578596711158752,
0.8542605638504028,
0.8498672246932983,
0.872348964214325,
0.8074748516082764,
0.8181561827659607,
0.8064658045768738,
0.8169063329696655,
0.778136670589447,
0.7958121299743652,
0.7910566329956055,
0.792497992515564,
0.9462042450904846,
0.8514739274978638,
0.832231879234314,
0.8589208126068115,
0.680853009223938,
0.6969889998435974,
0.7245824337005615,
0.7365910410881042,
0.8659448623657227,
0.9243783354759216,
0.8918185234069824,
0.8480554819107056,
0.8079396486282349,
0.7897405624389648,
0.7930581569671631,
0.8544381260871887,
0.791520357131958,
0.7843950986862183,
0.7925635576248169,
0.7775851488113403,
0.8365966081619263,
0.7951687574386597,
0.8200259208679199,
0.8081279993057251,
0.6839548349380493,
0.6894142031669617,
0.6568441390991211,
0.7385883331298828,
0.937089204788208,
0.7983649969100952,
0.8510754108428955,
0.8478814959526062,
0.8071223497390747,
0.7890468239784241,
0.8123265504837036,
0.8018288612365723,
0.783066987991333,
0.8380494117736816,
0.7788082361221313,
0.8230066895484924,
0.8112807273864746,
0.8384461998939514,
0.8076163530349731,
0.8186582922935486,
0.696408748626709,
0.672450065612793,
0.6571552753448486,
0.6883466243743896,
0.8381106853485107,
0.8499740362167358,
0.8359277844429016,
0.8618544340133667,
0.8227765560150146,
0.8195526599884033,
0.817588746547699,
0.8405366539955139,
0.7869840860366821,
0.7744306325912476,
0.7998096346855164,
0.804696798324585,
0.8082000613212585,
0.8190287351608276,
0.8053313493728638,
0.8398312330245972,
0.7198874354362488,
0.7060626149177551,
0.730606198310852,
0.6595810055732727,
0.8176620006561279,
0.8233619332313538,
0.8854089975357056,
0.8354135751724243,
0.8222517371177673,
0.8218865394592285,
0.8006408214569092,
0.8155827522277832,
0.7892162799835205,
0.7884358763694763,
0.7835586071014404,
0.7958096265792847,
0.8200152516365051,
0.7701331377029419,
0.8374406099319458,
0.8319003582000732,
0.6973418593406677,
0.7235449552536011,
0.710529088973999,
0.7084620594978333,
0.8762180805206299,
0.8688920140266418,
0.8176039457321167,
0.8626428842544556,
0.8131388425827026,
0.8122813701629639,
0.7953076362609863,
0.819471538066864,
0.7886457443237305,
0.782400369644165,
0.8094578981399536,
0.7998243570327759,
0.818349301815033,
0.8316985368728638,
0.812010645866394,
0.8328261375427246,
0.6918862462043762,
0.710659384727478,
0.6770690083503723,
0.6541815996170044,
0.8887937068939209,
0.9439001083374023,
0.856310248374939,
0.8627055883407593,
0.8178768157958984,
0.7917003035545349,
0.8069658279418945,
0.850294291973114,
0.8953027129173279,
0.7835325598716736,
0.7839470505714417,
0.783806324005127,
0.8212004899978638,
0.8017942905426025,
0.8232399225234985,
0.8248063921928406,
0.6992342472076416,
0.7314634323120117,
0.70451819896698,
0.7309004068374634,
0.8618248701095581,
0.8542187809944153,
0.867668628692627,
0.9285517334938049,
0.7823951840400696,
0.8346094489097595,
0.8224389553070068,
0.8365747928619385,
0.7881615161895752,
0.8024741411209106,
0.786060094833374,
0.8353466987609863,
0.8312903046607971,
0.965995192527771,
0.963456392288208,
0.8302041292190552,
0.6994296908378601,
0.7372418642044067,
0.7024518847465515,
0.7037609815597534,
0.8984535336494446,
0.8907756805419922,
0.8809530138969421,
0.8627505302429199,
0.8085797429084778,
0.8021430969238281,
0.7732670307159424,
0.8143824934959412,
0.7907568216323853,
0.7807286977767944,
0.8568848967552185,
0.7897283434867859,
0.8255360722541809,
0.7972369194030762,
0.8036868572235107,
0.8163213729858398,
0.6759803295135498,
0.6936249732971191,
0.6799125075340271,
0.6926159858703613,
0.8988490700721741,
0.8592813611030579,
0.8243701457977295,
0.903238832950592,
0.8241468071937561,
0.8069308996200562,
0.8201287984848022,
0.7841050624847412,
0.7792811393737793,
0.8060280084609985,
0.7625476121902466,
0.7868620157241821,
0.8161497712135315,
0.8303197622299194,
0.7792306542396545,
0.8059310913085938,
0.697796106338501,
0.6990535259246826,
0.6707046031951904,
0.6735702157020569,
0.8853741884231567,
0.8967627286911011,
0.8146432638168335,
0.8930838108062744,
0.8157107830047607,
0.8119871616363525,
0.8255273103713989,
0.8034995794296265,
0.8420792818069458,
0.7852970361709595,
0.790690004825592,
0.7803546786308289,
0.7941364645957947,
0.8078652024269104,
0.8126975297927856,
0.8300116062164307,
0.6533593535423279,
0.6735750436782837,
0.6643053293228149,
0.6741365790367126,
0.8827259540557861,
0.8744587302207947,
0.9047970175743103,
0.847032368183136,
0.8058528900146484,
0.812674880027771,
0.812221884727478,
0.7930185794830322,
0.7673184871673584,
0.7829562425613403,
0.7995753884315491,
0.8724443912506104,
0.8144638538360596,
0.8055335283279419,
0.7967004776000977,
0.8281360864639282,
0.7087081074714661,
0.6606754064559937,
0.7036505341529846,
0.6485708951950073,
0.8443787097930908,
0.8695067167282104,
0.8622814416885376,
0.8887115120887756,
0.8017468452453613,
0.8137669563293457,
0.7951174974441528,
0.8023478388786316,
0.793086051940918,
0.8458924293518066,
0.7797874212265015,
0.7740466594696045,
0.8087372183799744,
0.8186589479446411,
0.7913251519203186,
0.8110370635986328,
0.7854443192481995,
0.7472115159034729,
0.6496404409408569,
0.822590172290802,
0.8281947374343872,
0.8305429816246033,
0.8742111921310425,
0.87934410572052,
0.7923502922058105,
0.8156602382659912,
0.8129568696022034,
0.7861090302467346,
0.8569779396057129,
0.7702596187591553,
0.7784566879272461,
0.7830113172531128,
0.7971144914627075,
0.8071699142456055,
0.7887238264083862,
0.8038378953933716,
0.6600418090820312,
0.7282021045684814,
0.6939900517463684,
0.6732959747314453,
0.8160291314125061,
0.9708113670349121,
0.8423477411270142,
0.8696348667144775,
0.8041937351226807,
0.8053531646728516,
0.8090708255767822,
0.8667846918106079,
0.7718406319618225,
0.7836898565292358,
nan,
0.7602494359016418,
0.791589617729187,
0.8095853328704834,
0.7923385500907898,
0.7953474521636963,
0.6685555577278137,
0.6779947876930237,
0.6720991730690002,
0.7391604781150818,
0.8360368013381958,
0.9049165844917297,
0.8631795048713684,
0.876962423324585,
0.8243433237075806,
0.8033420443534851,
0.8052547574043274,
0.8066176772117615,
0.7674221992492676,
0.7662280201911926,
0.7890647649765015,
0.7823857665061951,
0.7921546101570129,
0.7831018567085266,
0.7912942171096802,
0.797396183013916,
0.6886642575263977,
0.6907260417938232,
0.7878344058990479,
0.6801505088806152,
0.8853906393051147,
0.8687604069709778,
0.8788730502128601,
0.912674069404602,
0.7988221049308777,
0.8031697869300842,
0.8087523579597473,
0.8071337938308716,
0.76828932762146,
0.7729291915893555,
0.7593337893486023,
0.7976247668266296,
0.7906322479248047,
0.8329700827598572,
0.8169757127761841,
0.7898601293563843,
0.6697261333465576,
0.6942530870437622,
0.6546465158462524,
0.6837555170059204,
0.8558700084686279,
0.879844069480896,
0.8672147989273071,
0.8106590509414673,
0.7787373065948486,
0.919110894203186,
0.7972562909126282,
0.7921329736709595,
0.7642859220504761,
0.7838021516799927,
0.8047149181365967,
0.8054327964782715,
0.7990342378616333,
0.8993138074874878,
0.8073618412017822,
0.7886511087417603,
0.672760009765625,
0.6745502948760986,
0.7903589606285095,
0.6945606470108032,
0.9013437628746033,
0.7963776588439941,
0.8055359125137329,
0.8087555170059204,
0.8066234588623047,
0.8197348713874817,
0.8039852380752563,
0.9034627676010132,
0.7845314741134644,
0.7773858308792114,
0.7615581750869751,
0.7797642946243286,
0.9741084575653076,
0.7673580050468445,
0.7928605079650879,
0.8001296520233154,
0.6988111734390259,
0.7155582308769226,
0.6862295866012573,
0.7110880017280579,
0.887053370475769,
0.8169295787811279,
0.8385128974914551,
0.8678780198097229,
0.8089169263839722,
0.8016522526741028,
0.799453616142273,
0.782762348651886,
0.771039605140686,
0.7521873116493225,
0.7556755542755127,
0.7850849032402039,
0.7853366136550903,
0.7987197637557983,
0.787310779094696,
0.7866647839546204,
0.7604407072067261,
0.72948157787323,
0.6628735065460205,
0.6591448783874512,
0.9127955436706543,
0.8628464341163635,
0.8305394649505615,
0.8180375099182129,
0.8458765149116516,
0.8178287744522095,
0.7862902879714966,
0.7828153371810913,
0.7666792273521423,
0.7812045812606812,
0.7608065605163574,
0.7826054692268372,
0.7816157341003418,
0.7947003841400146,
0.8168044090270996,
0.814071774482727,
0.7220650911331177,
0.6890503168106079,
0.7007960081100464,
0.8107403516769409,
0.7702553868293762,
0.8163463473320007,
0.850862443447113,
0.7849102020263672,
0.8005057573318481,
0.8741745948791504,
0.798865020275116,
0.7920798063278198,
0.7586799263954163,
0.7786367535591125,
0.7675566673278809,
0.7679545879364014,
0.8015233278274536,
0.8989728093147278,
0.7801311612129211,
0.7969022393226624,
0.6224015951156616,
0.6747409105300903,
0.7008765935897827,
0.6831722259521484,
0.8658351898193359,
0.8389387130737305,
0.8378266096115112,
0.8527539968490601,
0.785332202911377,
0.8142926692962646,
0.7857670783996582,
0.7803941369056702,
0.7714258432388306,
0.774556040763855,
0.7598479986190796,
0.7679096460342407,
0.7671676874160767,
0.7864881753921509,
0.8018573522567749,
0.7860887050628662,
0.7901706695556641,
0.7139504551887512,
0.6212520599365234,
0.6816715002059937,
0.7959217429161072,
0.8217151165008545,
0.7596768140792847,
0.8532966375350952,
0.804735004901886,
0.7913546562194824,
0.7792305946350098,
0.7898867130279541,
0.7679917812347412,
0.7500064373016357,
0.8481332063674927,
0.7717246413230896,
0.774296760559082,
0.7832903265953064,
0.7652856111526489,
0.8103865385055542,
0.6691515445709229,
0.6733180284500122,
0.6880985498428345,
0.6444600820541382,
0.8511993288993835,
0.8190510272979736,
0.8036661744117737,
0.8491532802581787,
...]}
3D animation mode#
text_prompts = {
0: "A beautiful new world in Jeju, artstation matte painting.",
100: "Beautiful mountains in Jeju, artstation matte painting.",
300: "A beautiful sea in Jeju, artstation matte painting.",
500: "A beautiful woman in Jeju, artstation matte painting.",
700: "A beautiful wind in Jeju, artstation matte painting.",
900: "A beautiful new world in Jeju, artstation matte painting.",
}
batch_name = "newworld-3d"
disco.imagine(
text_prompts,
batch_name=batch_name,
batch_num=11,
resume_run=True,
steps=300,
animation_mode="3D",
rotation_3d_z="0: (0), 500: (1), 600: (-1)",
# perlin_init=True,
# perlin_mode="color",
diffusion_sampling_mode='ddim',
max_frames = 5000,
width_height = [768, 512],
clip_guidance_scale=7500,
)
INFO:ekorpkit.models.disco.base:translation_x: 0.0
INFO:ekorpkit.models.disco.base:translation_y: 0.0
INFO:ekorpkit.models.disco.base:translation_z: 10.0
INFO:ekorpkit.models.disco.base:rotation_3d_x: 0.0
INFO:ekorpkit.models.disco.base:rotation_3d_y: 0.0
INFO:ekorpkit.models.disco.base:rotation_3d_z: -0.6799999999999999
INFO:ekorpkit.models.disco.base:translation: [-0.0, 0.0, -0.05]
INFO:ekorpkit.models.disco.base:rotation: [0.0, 0.0, -0.6799999999999999]
INFO:ekorpkit.models.disco.base:rot_mat: tensor([[[ 1.0000, 0.0119, 0.0000],
[-0.0119, 1.0000, 0.0000],
[ 0.0000, 0.0000, 1.0000]]], device='cuda:4')
INFO:ekorpkit.models.disco.disco_xform_utils:Running AdaBins depth estimation implementation...
Loading base model ()...
Using cache found in /root/.cache/torch/hub/rwightman_gen-efficientnet-pytorch_master
Done.
Removing last two layers (global_pool & classifier).
Building Encoder-Decoder model..Done.
INFO:ekorpkit.models.disco.disco_xform_utils:Running MiDaS depth estimation implementation...
2D animation mode#
text_prompts = "Brave and beautiful new world in Jeju, artstation matte painting."
batch_name = "newworld-2d"
disco.imagine(
text_prompts,
batch_name=batch_name,
steps=300,
animation_mode = '2D',
# rotation_3d_z="0: (1)",
# perlin_init=True,
# perlin_mode="color",
diffusion_sampling_mode='ddim',
max_frames = 50,
width_height = [768, 512],
clip_guidance_scale=7500,
)
Video Input Mode#
text_prompts = "A beautiful new world in Jeju, artstation matte painting."
batch_name = "newworld-video"
disco.imagine(
text_prompts,
batch_name=batch_name,
steps=250,
animation_mode="Video Input",
video_init_path="/workspace/projects/ekorpkit-book/disco-imagen/outputs/disco-diffusion/newworld-3d/newworld-3d(9).mp4",
# rotation_3d_z="0: (1)",
# perlin_init=True,
# perlin_mode="color",
diffusion_sampling_mode='ddim',
max_frames = 10,
width_height = [768, 512],
clip_guidance_scale=7500,
)
INFO:ekorpkit.models.disco.base:warping frames with flow blend ratio: 0.999
INFO:ekorpkit.models.disco.base:Image prompt: []
INFO:ekorpkit.models.disco.base:Frame 4 Prompt: ['A beautiful new world in Jeju, artstation matte painting.']
INFO:ekorpkit.models.disco.base:Seed used: 3402861987
INFO:ekorpkit.models.disco.base: >> elapsed time to diffuse: 0:02:33.218085
INFO:ekorpkit.models.art.base:Saving config to /workspace/projects/ekorpkit-book/disco-imagen/outputs/disco-diffusion/newworld-video/newworld-video(0)_settings.yaml
Create a video from output frames#
batch_name = "newworld-video"
batch_num = 0
mp4_path = disco.create_video(
batch_name=batch_name,
batch_num=batch_num,
)
from IPython.display import Video
Video(mp4_path, embed=True)
Collage generated sample images#
disco.collage(
batch_name=batch_name,
batch_num=4,
ncols=2,
num_images=4,
show_filename=True,
fontcolor="black",
)
INFO:ekorpkit.models.dalle.base:Loading config from /workspace/projects/ekorpkit-book/disco-imagen/outputs/disco-diffusion/halla/halla(4)_settings.yaml
INFO:ekorpkit.models.dalle.base:Merging config with diffuse defaults
INFO:ekorpkit.models.disco.base:Will save every 2 steps
INFO:ekorpkit.models.disco.base:Using seed: 221812581
INFO:ekorpkit.models.dalle.base:Prompt: Mt. Halla's beautiful flowers, artstation matte painting
INFO:ekorpkit.io.file:Processing [4] files from ['halla(4)_*.png']
Make a gif of a specific sample image’s progresses#
disco.make_gif(
batch_name='halla',
batch_num=1,
sample_num=1,
show=False,
duration=100,
force_remake=True,
)
Saved GIF to /workspace/projects/ekorpkit-book/disco-imagen/outputs/halla/halla(1)_0001.gif
Show Configuration#
disco.show_config(batch_name=batch_name, batch_num=4)
INFO:ekorpkit.models.disco.base:Loading config from /workspace/projects/ekorpkit-book/disco-imagen/outputs/halla/halla(4)_settings.yaml
INFO:ekorpkit.models.disco.base:Merging config with diffuse defaults
INFO:ekorpkit.models.disco.base:Merging config with args: {}
INFO:ekorpkit.models.disco.base:Will save every 2 steps
INFO:ekorpkit.models.disco.base:Using seed: 3370684779
{'angle': '0:(0)',
'animation_mode': 'None',
'batch_name': 'halla',
'batch_num': 7,
'batch_size': 1,
'calc_frames_skip_steps': 150,
'clamp_grad': True,
'clamp_max': 0.05,
'clip_denoised': False,
'clip_guidance_scale': 5000,
'cut_ic_pow': 1,
'cut_icgray_p': '[0.2]*400+[0]*600',
'cut_innercut': '[4]*400+[12]*600',
'cut_overview': '[12]*400+[4]*600',
'cutn_batches': 4,
'display_rate': 20,
'eta': 0.8,
'extract_nth_frame': 2,
'far_plane': 10000,
'force_flow_generation': False,
'fov': 40,
'frames_scale': 1500,
'frames_skip_steps': '60%',
'fuzzy_prompt': False,
'image_prompts': None,
'init_image': 'None',
'init_scale': 1000,
'intermediate_saves': 250,
'intermediates_in_subfolder': True,
'interp_spline': 'Linear',
'key_frames': True,
'max_frames': 1,
'midas_depth_model': 'dpt_large',
'midas_weight': 0.3,
'n_samples': 4,
'near_plane': 200,
'padding_mode': 'border',
'perlin_init': False,
'perlin_mode': 'mixed',
'persistent_frame_output_in_batch_folder': True,
'rand_mag': 0.05,
'randomize_class': True,
'range_scale': 150,
'resume_from_frame': 'latest',
'resume_run': False,
'retain_overwritten_frames': False,
'rotation_3d_x': '0: (0)',
'rotation_3d_y': '0: (0)',
'rotation_3d_z': '0: (0)',
'run_to_resume': 'latest',
'sampling_mode': 'bicubic',
'sat_scale': 0,
'seed': 3370684779,
'set_seed': 'random_seed',
'show_collage': True,
'side_x': 768,
'side_y': 512,
'skip_augs': False,
'skip_steps': 10,
'start_frame': 0,
'steps': 250,
'steps_per_checkpoint': 2,
'stop_on_next_loop': False,
'text_prompts': {0: ["Mt. Halla's beautiful flowers, artstation matte "
'painting'],
100: ['This set of prompts start at frame 100',
'This prompt has weight five:5']},
'transformation_percent': [0.09],
'translation_x': '0: (0)',
'translation_y': '0: (0)',
'translation_z': '0: (10.0)',
'turbo_mode': False,
'turbo_preroll': 10,
'turbo_steps': '3',
'tv_scale': 0,
'use_horizontal_symmetry': False,
'use_vertical_symmetry': False,
'video_init_blend_mode': 'optical flow',
'video_init_check_consistency': False,
'video_init_clip_guidance_scale': 1000,
'video_init_cutn_batches': 4,
'video_init_file': 'init.mp4',
'video_init_flow_blend': 0.999,
'video_init_flow_warp': True,
'video_init_frames_scale': 15000,
'video_init_frames_skip_steps': '70%',
'video_init_path': '/workspace/projects/ekorpkit-book/disco-imagen/init_images/init.mp4',
'video_init_range_scale': 150,
'video_init_sat_scale': 300,
'video_init_seed_continuity': False,
'video_init_skip_steps': 50,
'video_init_steps': 100,
'video_init_tv_scale': 0.1,
'vr_eye_angle': 0.5,
'vr_ipd': 5.0,
'vr_mode': False,
'width_height': [768, 512],
'zoom': '0: (1), 10: (1.05)'}
Model Parameters#
disco.parameters()
{'advanced': {'clamp_grad': "true {type: 'boolean'}",
'clamp_max': "0.05 {type: 'number'}",
'eta': "0.8 {type: 'number'}",
'set_seed': "random_seed {type: 'string'}"},
'advanced_extra': {'clip_denoised': 'false',
'fuzzy_prompt': 'false',
'rand_mag': '0.05',
'randomize_class': 'true'},
'advanced_perlin_init': {'perlin_init': "false {type: 'boolean'} : Perlin "
'init will replace your init',
'perlin_mode': "mixed ['mixed', 'color', 'gray']"},
'animation_2d': {'angle': "'0:(0)' {type: 'string'} : All rotations are "
'provided in degrees.',
'far_plane': "10000 {type: 'number'}",
'fov': "40 {type: 'number'}",
'interp_spline': 'Linear '
"['Linear','Quadratic','Cubic']{type: "
"'string'} : Do not change, currently will "
'not look good.',
'key_frames': "true {type: 'boolean'}",
'max_frames': "10000 {type: 'number'}",
'midas_depth_model': "dpt_large {type: 'string'}",
'midas_weight': "0.3 {type: 'number'}",
'near_plane': "200 {type: 'number'}",
'padding_mode': "border {type: 'string'}",
'rotation_3d_x': "'0: (0)' {type: 'string'}",
'rotation_3d_y': "'0: (0)' {type: 'string'}",
'rotation_3d_z': "'0: (0)' {type: 'string'}",
'sampling_mode': "bicubic {type: 'string'}",
'translation_x': "'0: (0)' {type: 'string'}",
'translation_y': "'0: (0)' {type: 'string'}",
'translation_z': "'0: (10.0)' {type: 'string'}",
'zoom': "'0: (1), 10: (1.05)' {type: 'string'} : # `zoom` is "
'a multiplier of dimensions, 1 is no zoom.'},
'animation_3d_turbo_mode': {'turbo_mode': "false {type: 'boolean'} : (Starts "
'after frame 10,) skips diffusion '
'steps and just uses depth map to '
'warp images for skipped frames. '
'Speeds up rendering by 2x-4x, and '
'may improve image coherence '
'between frames. For different '
'settings tuned for Turbo Mode, '
'refer to the original Disco-Turbo '
'Github: '
'https://github.com/zippy731/disco-diffusion-turbo',
'turbo_preroll': '10 # frames',
'turbo_steps': '"3" ["2","3","4","5","6"] {type: '
'"string"}'},
'animation_3d_vr_mode': {'vr_eye_angle': "0.5 {type: 'number'} : "
'`vr_eye_angle` is the y-axis '
'rotation of the eyes towards the '
'center',
'vr_ipd': "5.0 {type: 'number'} : interpupillary "
'distance (between the eyes)',
'vr_mode': "false {type: 'boolean'} : Enables stereo "
'rendering of left/right eye views '
'(supporting Turbo) which use a different '
'(fish-eye) camera projection matrix. '
"Note the images you're prompting will "
'work better if they have some inherent '
'wide-angle aspect. The generated images '
'will need to be combined into left/right '
'videos. These can then be stitched into '
'the VR180 format. Google made the VR180 '
'Creator tool but subsequently stopped '
"supporting it. It's available for "
'download in a few places including '
'https://www.patrickgrunwald.de/vr180-creator-download. '
'The tool is not only good for stitching '
'(videos and photos) but also for adding '
'the correct metadata into existing '
'videos, which is needed for services '
'like YouTube to identify the format '
'correctly. Watching YouTube VR videos '
"isn't necessarily the easiest depending "
'on your headset. For instance Oculus '
'have a dedicated media studio and store '
'which makes the files easier to access '
'on a Quest '
'https://creator.oculus.com/manage/mediastudio/. '
'The command to get ffmpeg to concat your '
'frames for each eye is in the form: '
'`ffmpeg -framerate 15 -i frame_%4d_l.png '
'l.mp4` (repeat for r)'},
'basic': {'clip_guidance_scale': "5000 {type: 'number'}",
'cutn_batches': "4 {type: 'number'}",
'range_scale': "150 {type: 'number'}",
'sat_scale': "0 {type: 'number'}",
'skip_augs': "false {type: 'boolean'}",
'steps': "250 [25,50,100,150,250,500,1000] {type: 'raw', "
'allow-input: true}',
'tv_scale': "0 {type: 'number'}",
'width_height': "[1280, 768] {type: 'raw'}"},
'coherency': {'frames_scale': "1500 {type: 'integer'} : `frame_scale` tries "
'to guide the new frame to looking like the old '
'one. A good default is 1500.',
'frames_skip_steps': "'60%' ['40%', '50%', '60%', '70%', '80%'] "
"{type: 'string'} : `frame_skip_steps` "
'will blur the previous frame - higher '
'values will flicker less but struggle to '
'add enough new detail to zoom into.'},
'cutn_scheduling': {'cut_ic_pow': "1 {type: 'number'}",
'cut_icgray_p': "'[0.2]*400+[0]*600' {type: 'string'}",
'cut_innercut': "'[4]*400+[12]*600' {type: 'string'}",
'cut_overview': "'[12]*400+[4]*600' {type: 'string'} \n"
'>> Format: `[40]*400+[20]*600` = 40 cuts '
'for the first 400 /1000 steps, then 20 '
'for the last 600/1000. cut_overview and '
'cut_innercut are cumulative for total '
'cutn on any given step. Overview cuts '
'see the entire image and are good for '
'early structure, innercuts are your '
'standard cutn.'},
'init_image': {'init_image': "None {type: 'string'}",
'init_scale': "1000 {type: 'integer'}",
'skip_steps': "10 {type: 'integer'} *Make sure you set "
'skip_steps to ~50% of your steps if you want to '
'use an init image.*'},
'run': {'animation_mode': "None ['None', '2D', '3D', 'Video Input'] "
"{type:'string'}",
'batch_name': "TimeToDisco {type: 'string'}",
'batch_size': '1',
'diffusion_sampling_mode': "ddim ['plms','ddim']",
'display_rate': "20 {type: 'number'}",
'n_samples': "6 {type: 'number'}",
'resume_from_frame': 'latest',
'resume_run': 'false',
'retain_overwritten_frames': 'true',
'run_to_resume': 'latest',
'show_collage': 'true',
'use_secondary_model': 'true'},
'saving': {'intermediate_saves': "0 {type: 'raw'} : Intermediate steps will "
'save a copy at your specified intervals. '
'You can either format it as a single '
'integer or a list of specific steps. A '
'value of `2` will save a copy at 33% and '
'66%. 0 will save none. A value of `[5, 9, '
'34, 45]` will save at steps 5, 9, 34, and '
'45. (Make sure to include the brackets)',
'intermediates_in_subfolder': "true {type: 'boolean'}",
'steps_per_checkpoint': None},
'transformation': {'transformation_percent': '[0.09]',
'use_horizontal_symmetry': "false {type: 'boolean'}",
'use_vertical_symmetry': "false {type: 'boolean'}"},
'video_init': {'video_init_clip_guidance_scale': "1000 {type: 'number'}",
'video_init_cutn_batches': "4 {type: 'number'}",
'video_init_range_scale': "150 {type: 'number'}",
'video_init_sat_scale': "300 {type: 'number'}",
'video_init_skip_steps': "50 {type: 'integer'}",
'video_init_steps': '100 [25,50,100,150,250,500,1000]{type: '
"'raw', allow-input: true}",
'video_init_tv_scale': "0.1 {type: 'number'}"},
'video_init_coherency': {'force_flow_generation': "false {type:'boolean'}",
'video_init_frames_scale': "15000 {type: 'integer'} "
': `frame_scale` tries to '
'guide the new frame to '
'looking like the old '
'one. A good default is '
'1500.',
'video_init_frames_skip_steps': "'70%' ['40%', "
"'50%', '60%', "
"'70%', '80%'] "
"{type: 'string'} : "
'`frame_skip_steps` '
'will blur the '
'previous frame - '
'higher values will '
'flicker less but '
'struggle to add '
'enough new detail '
'to zoom into.'},
'video_init_flow': {'video_init_blend_mode': "optical flow ['None', 'linear', "
"'optical flow'] : Call optical "
'flow from video frames and warp '
'prev frame with flow',
'video_init_check_consistency': 'false',
'video_init_flow_blend': "0.999 {type: 'number'} : 0 - "
'take next frame, 1 - take prev '
'warped frame',
'video_init_flow_warp': "true {type: 'boolean'} : Call "
'optical flow from video frames '
'and warp prev frame with flow'},
'video_init_input': {'extract_nth_frame': "2 {type: 'number'}",
'persistent_frame_output_in_batch_folder': 'true {type: '
"'boolean'}",
'video_init_file': "init.mp4 {type: 'string'}",
'video_init_path': '{..path.init_dir}/{.video_init_file}',
'video_init_seed_continuity': "false {type: 'boolean'}"},
'video_output': {'blend': '0.5',
'fps': '12',
'init_frame': "1 {type: 'number'} : This is the frame where "
'the video will start',
'last_frame': "final_frame {type: 'number'} \n"
'>> You can change i to the number of the last '
'frame you want to generate. \n'
'It will raise an error if that number of '
'frames does not exist.',
'skip_video_for_run_all': 'false',
'video_init_check_consistency': 'false',
'view_video_in_cell': 'false'}}
disco.parameters("display")
[display_rate]
20 {type: 'number'}